<template>
  <view class="container">
    <z-paging ref="paging" v-model="list" @query="getlist">
      <template #top>
        <view class="header">
          <text class="header-title">训练计划</text>
        </view>
      </template>

      <view class="plan-list">
        <view
          class="plan-card"
          v-for="(item, index) in list"
          :key="index"
        >
          <view class="card-content">
            <view class="plan-header">
              <view class="plan-title">瘦全身瘦大腿</view>
              <view class="plan-date">2024-10-11</view>
            </view>
            
            <view class="plan-status">
              <view class="status-label">签字状态</view>
              <view class="status-value">
                <text class="status-icon">✓</text>
                已签字
              </view>
            </view>
          </view>
        </view>
      </view>
    </z-paging>
  </view>
</template>

<style lang="scss" scoped>
.container {
  min-height: 100vh;
  background: #f8f8f8;
  padding-bottom: 30rpx;
}

.header {
  background: #fff;
  padding: 40rpx 30rpx;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 10;

  &-title {
    font-size: 36rpx;
    font-weight: 600;
    color: #000;
    text-align: center;
    display: block;
  }
}

.plan-list {
  padding: 20rpx;
}

.plan-card {
  background: #fff;
  border-radius: 20rpx;
  margin-bottom: 20rpx;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
  overflow: hidden;

  &:active {
    transform: translateY(2rpx);
    box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
  }

  .card-content {
    padding: 30rpx;
  }

  .plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20rpx;
    padding-bottom: 20rpx;
    border-bottom: 2rpx solid #f5f5f5;
  }

  .plan-title {
    font-size: 32rpx;
    font-weight: bold;
    color: #000;
  }

  .plan-date {
    font-size: 24rpx;
    color: #999;
    background: #f5f5f5;
    padding: 8rpx 20rpx;
    border-radius: 20rpx;
  }

  .plan-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    .status-label {
      font-size: 28rpx;
      color: #666;
    }

    .status-value {
      display: flex;
      align-items: center;
      font-size: 28rpx;
      color: #4CAF50;
      
      .status-icon {
        margin-right: 10rpx;
        font-weight: bold;
      }
    }
  }

  // 3D hover effect
  &:hover {
    transform: translateY(-2rpx) scale(1.01);
    box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.08);

    .plan-title {
      background: linear-gradient(45deg, #000, #333);
      -webkit-background-clip: text;
      color: transparent;
    }
  }
}

// Add subtle animation for status
.status-value {
  transition: all 0.3s ease;
  
  &:hover {
    transform: scale(1.05);
    
    .status-icon {
      animation: pulse 1s infinite;
    }
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
</style>

<script>
export default {
  data() {
    return {
      list: []
    };
  },
  methods: {
    async getlist(pageNo, pageNum = 10) {
      this.$refs.paging.complete(Array(20).fill({}));
    },

  }
};
</script>